#ifndef TETEL_H
#define TETEL_H

class Tetel
{
    protected:
        std::string _t;
        std::string _name;
        std::string _category;
        int _value;
        int _quantity;
    public:
        std::string GetName() const {return _name;}
        std::string GetCategory() const {return _category;}
        int GetValue() const {return _value;}
        int GetQuantity() const {return _quantity;}
        std::string GetT() const {return _t;}
        void SetQuantity(int quantity) {_quantity = quantity;}
        friend std::ostream& operator<<(std::ostream& os, const Tetel& f)
        {
            os << f._name << ";" << f._category << ";" << f._value << ";" << std::endl;
            return os;
        }
        virtual std::string GetComment() {}
};

class Termek : public Tetel
{
    public:
        Termek(std::string name, std::string category, int value, int quantity)
        {
            _t = "t";
            _name = name;
            _category = category;
            _value = value;
            _quantity = quantity;
        }
        Termek(Tetel& rhs)
        {
            _t = rhs.GetT();
            _name = rhs.GetName();
            _category = rhs.GetCategory();
            _value = rhs.GetValue();
            _quantity = rhs.GetQuantity();
        }
};

class Szolgaltatas : public Tetel
{
        std::string _comment;
    public:
        Szolgaltatas(std::string name, std::string category, int value, int quantity, std::string comment = "")
        {
            _t = "sz";
            _name = name;
            _category = category;
            _value = value;
            _quantity = quantity;
            _comment = comment;
        }
        Szolgaltatas(Tetel& rhs, const std::string comment)
        {
            _t = rhs.GetT();
            _name = rhs.GetName();
            _category = rhs.GetCategory();
            _value = rhs.GetValue();
            _quantity = rhs.GetQuantity();
            _comment = comment;
        }
        std::string GetComment() {return _comment;}
        void SetComment(std::string comment) {_comment = comment;}
};

#endif
